<?php
require_once 'layout.php';

$title = "ACME自动化部署";
$currentPage = "automation";

$content = '
<section class="hero">
    <div class="container">
        <div class="hero-content">
            <h1>ACME自动化部署</h1>
            <p>完全兼容标准ACME协议，使用预签发技术保证99.9%成功率，让SSL证书管理变得简单高效</p>
            <div class="hero-actions">
                <a href="/contact" class="btn btn-success">开始使用</a>
                <a href="/help" target="_blank" class="btn btn-primary">查看文档</a>
            </div>
        </div>
    </div>
</section>

<section class="section">
    <div class="container">
        <h2 class="section-title">什么是ACME协议</h2>
        <p class="section-subtitle">自动化证书管理环境（ACME）是一种通信协议，用于自动化数字证书的验证、签署、安装和续期</p>
        
        <div class="acme-features" style="margin-top: 50px;">
            <div class="features-grid">
                <div class="feature-card">
                    <div class="feature-icon">
                        <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">
                            <circle cx="15" cy="15" r="12" fill="none" stroke="white" stroke-width="2"/>
                            <path d="M10 15l3 3 7-7" stroke="white" stroke-width="2" fill="none"/>
                        </svg>
                    </div>
                    <h3>标准兼容</h3>
                    <p>完全遵循RFC 8555标准，与Let\'s Encrypt、Certbot等主流ACME客户端100%兼容</p>
                </div>
                
                <div class="feature-card">
                    <div class="feature-icon">
                        <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">
                            <rect x="5" y="8" width="20" height="14" rx="2" fill="none" stroke="white" stroke-width="2"/>
                            <path d="M25 12l-5-5-5 5" stroke="white" stroke-width="2" fill="none"/>
                            <path d="M5 12l5-5 5 5" stroke="white" stroke-width="2" fill="none"/>
                        </svg>
                    </div>
                    <h3>自动续期</h3>
                    <p>证书到期前自动续期，无需人工干预，确保网站7x24小时安全运行</p>
                </div>
                
                <div class="feature-card">
                    <div class="feature-icon">
                        <svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">
                            <polygon points="15,2 18,12 28,12 20,18 23,28 15,22 7,28 10,18 2,12 12,12" fill="white"/>
                        </svg>
                    </div>
                    <h3>预签发技术</h3>
                    <p>独有的预签发技术，提前生成证书模板，确保99.9%的成功率，避免签发失败</p>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="section" style="background: var(--bg-light);">
    <div class="container">
        <h2 class="section-title">支持的ACME客户端</h2>
        <p class="section-subtitle">与市面上主流的ACME客户端完全兼容，开箱即用</p>
        
        <div class="clients-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 50px;">
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="12">CB</text>
                    </svg>
                </div>
                <h3>Certbot</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">EFF官方ACME客户端，支持Apache和Nginx自动配置</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    certbot --server https://acme.cnssl.com/directory
                </code>
            </div>
            
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: var(--accent-green); border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="12">AC</text>
                    </svg>
                </div>
                <h3>acme.sh</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">纯Shell脚本实现，轻量级，支持多种Web服务器</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    acme.sh --server https://acme.cnssl.com/directory
                </code>
            </div>
            
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: #f59e0b; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="12">LG</text>
                    </svg>
                </div>
                <h3>Lego</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">Go语言开发，支持多种DNS服务商，功能强大</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    lego --server https://acme.cnssl.com/directory
                </code>
            </div>
            
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: #8b5cf6; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="12">CD</text>
                    </svg>
                </div>
                <h3>Caddy</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">现代化Web服务器，内置ACME支持，零配置HTTPS</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    caddy run --config Caddyfile
                </code>
            </div>
            
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: #ef4444; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="12">TR</text>
                    </svg>
                </div>
                <h3>Traefik</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">云原生边缘路由器，支持容器和微服务自动证书</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    traefik --certificatesresolvers.le.acme.caserver=https://acme.cnssl.com/directory
                </code>
            </div>
            
            <div class="client-card" style="background: white; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <div class="client-icon" style="width: 80px; height: 80px; margin: 0 auto 20px; background: #6b7280; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
                    <svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                        <text x="20" y="24" text-anchor="middle" fill="white" font-size="10">More</text>
                    </svg>
                </div>
                <h3>更多客户端</h3>
                <p style="color: var(--text-light); margin-bottom: 20px;">支持所有符合RFC 8555标准的ACME客户端</p>
                <code style="background: var(--bg-light); padding: 10px; border-radius: 4px; display: block; font-family: monospace;">
                    --server https://acme.cnssl.com/directory
                </code>
            </div>
        </div>
    </div>
</section>

<section class="section">
    <div class="container">
        <h2 class="section-title">快速开始</h2>
        <p class="section-subtitle">几个简单步骤，即可开始使用ACME自动化服务</p>
        
        <div class="setup-steps" style="margin-top: 50px;">
            <div class="step-container" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px;">
                <div class="setup-step" style="text-align: center;">
                    <div style="width: 80px; height: 80px; background: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 2rem; font-weight: bold;">1</div>
                    <h3>注册账户</h3>
                    <p style="color: var(--text-light); margin-top: 15px;">注册ACME账户并获取API访问密钥，完全免费开始使用</p>
                    <div style="background: var(--bg-light); padding: 20px; border-radius: 8px; margin-top: 20px;">
                        <code style="font-family: monospace; color: var(--primary-blue);">
                            curl -X POST https://acme.cnssl.com/acme/new-acct
                        </code>
                    </div>
                </div>
                
                <div class="setup-step" style="text-align: center;">
                    <div style="width: 80px; height: 80px; background: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 2rem; font-weight: bold;">2</div>
                    <h3>配置客户端</h3>
                    <p style="color: var(--text-light); margin-top: 15px;">配置您选择的ACME客户端，指向我们的ACME服务器端点</p>
                    <div style="background: var(--bg-light); padding: 20px; border-radius: 8px; margin-top: 20px;">
                        <code style="font-family: monospace; color: var(--primary-blue);">
                            --server https://acme.cnssl.com/directory
                        </code>
                    </div>
                </div>
                
                <div class="setup-step" style="text-align: center;">
                    <div style="width: 80px; height: 80px; background: var(--accent-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: white; font-size: 2rem; font-weight: bold;">3</div>
                    <h3>自动获取证书</h3>
                    <p style="color: var(--text-light); margin-top: 15px;">运行命令即可自动获取、安装和续期SSL证书，完全自动化</p>
                    <div style="background: var(--bg-light); padding: 20px; border-radius: 8px; margin-top: 20px;">
                        <code style="font-family: monospace; color: var(--accent-green);">
                            certbot --nginx -d example.com
                        </code>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="section" style="background: var(--bg-light);">
    <div class="container">
        <h2 class="section-title">技术优势</h2>
        
        <div class="advantages-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px;">
            <div class="advantage-card" style="background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <h3 style="color: var(--primary-blue); margin-bottom: 20px;">高可用性保证</h3>
                <ul style="list-style: none; color: var(--text-light);">
                    <li style="padding: 8px 0;">✓ 99.9% SLA 服务保证</li>
                    <li style="padding: 8px 0;">✓ 多地域部署，就近访问</li>
                    <li style="padding: 8px 0;">✓ 自动故障转移和恢复</li>
                    <li style="padding: 8px 0;">✓ 实时监控和告警系统</li>
                </ul>
            </div>
            
            <div class="advantage-card" style="background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <h3 style="color: var(--primary-blue); margin-bottom: 20px;">安全性保障</h3>
                <ul style="list-style: none; color: var(--text-light);">
                    <li style="padding: 8px 0;">✓ 端到端加密通信</li>
                    <li style="padding: 8px 0;">✓ 严格的身份验证机制</li>
                    <li style="padding: 8px 0;">✓ 防止重放攻击和篡改</li>
                    <li style="padding: 8px 0;">✓ 符合国际安全标准</li>
                </ul>
            </div>
            
            <div class="advantage-card" style="background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
                <h3 style="color: var(--primary-blue); margin-bottom: 20px;">性能优化</h3>
                <ul style="list-style: none; color: var(--text-light);">
                    <li style="padding: 8px 0;">✓ 预签发技术加速签发</li>
                    <li style="padding: 8px 0;">✓ 智能负载均衡</li>
                    <li style="padding: 8px 0;">✓ CDN 加速全球访问</li>
                    <li style="padding: 8px 0;">✓ 异步处理提升响应</li>
                </ul>
            </div>
        </div>
        
        <div style="text-align: center; margin-top: 60px;">
            <a href="/contact" class="btn btn-primary btn-large">开始使用 ACME</a>
            <a href="/help" target="_blank" class="btn btn-outline btn-large" style="margin-left: 20px;">查看API文档</a>
        </div>
    </div>
</section>
';

renderPage($title, $content, $currentPage);
?>